/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sun.dtv.ui;
import org.thenesis.microbackend.ui.UIBackend;

/**
 *
 * @author Leonardo Baptista (cbs) - http://cbs.net.br
 */
public class Device {

    private static Device device;
    protected static UIBackend backend;

    protected Device(UIBackend p_backend){
        System.out.println("Entrando aqui");
        if (this == null)
            System.out.println("Nuloooo");
        Device.device = this;
        backend = p_backend;
        initGetScreens();
    }

    public Screen getDefaultScreen(){
        return Screen.getDefaultScreen();
    }

    public static Device getInstance(){
        return device;
    }

    public Screen[] getScreens(){
        return Screen.getInstances();
    }

    private void initGetScreens(){
        Screen.initScreens();
    }
}